<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8">
		<title></title>
		<style>
			*{
				margin: 0;
				padding: 0;
			}
			
			.list li{
				list-style: none;
			}
			
			.list li a{
				text-decoration: none;
			}
			
			.list{
				width: 200px;
				height: 150px;
				border: #000000 solid 1px;
			}
			
			.list li{
				width: 200px;
				height: 50px;
				text-align: center;
				line-height: 50px;
				background-color: #FF69B4;
				box-sizing: border-box;
			}
			
			.list li:nth-child(2){
				border-top: #000000 solid 1px;
				border-bottom: #000000 solid 1px;
			}
			
			.list li a{
				color: white;
				font-size: 20px;
			}
			
			
		</style>
	</head>
	<body>
		<ul class="list">
			<li>
				<a href="javascript:;">宝马540</a>
			</li>
			<li>
				<a href="javascript:;">奥迪a8</a>
			</li>
			<li>
				<a href="javascript:;">奔驰gl350</a>
			</li>
		</ul>
		<script>
			//请用代码实现
            
            var oLis = document.querySelectorAll('li');
            for(var i = 0; i < oLis.length; i++){
                oLis[i].onmouseenter = function(){
                    this.style.backgroundColor = 'blue';
                }
                oLis[i].onmouseleave = function(){
                    this.style.backgroundColor = '#FF69B4';
                }
            }
		</script>
		
	</body>
</html>